package br.usp.ime.protoc.client;

import java.util.List;

import br.usp.ime.protoc.pessoa.Parente;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface ParenteService extends RemoteService {

	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {

		private static ParenteServiceAsync instance;

		public static ParenteServiceAsync getInstance() {
			if (instance == null) {
				instance = (ParenteServiceAsync) GWT
						.create(ParenteService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getModuleBaseURL()
						+ "/ParenteService");
			}
			return instance;
		}
	}

	/**
	 * Obtem Parentes.
	 */
	public List<Parente> obterParentes();

	/**
	 * Obter Parente.
	 */
	public Parente obterParente(int id);

	/**
	 * Incluir Parente.
	 */
	public Boolean incluirParente(Parente parente);

	/**
	 * Alterar Parente.
	 */
	public Boolean alterarParente(Parente parente);

	/**
	 * Excluir Parente.
	 */
	public Boolean excluirParente(int id);

}
